<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="refresh" content="3;url=http://www.baidu.com">
    <title>Document</title>
</head>

<body>
    <div></div>
    <script>
        var div = document.querySelector('div');
        //去掉问号
        var str = location.search.substr(1);
        //分离键值
        var arr=str.split('=');
        div.innerHTML = arr[1];
    </script>
</body>

</html>
